package com.cc.demo.feign;

import com.cc.demo.dto.TransactionMessage;
import com.cc.demo.feign.fallback.MessageCenterFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "message-center", fallback = MessageCenterFeignFallback.class)
public interface MessageCenterFeign {

    @RequestMapping(value = "/transaction/prepare", method = RequestMethod.POST)
    TransactionMessage<?> prepareMessage(@RequestBody TransactionMessage<?> transactionMessage);
}
